﻿using MechAddin.Common;
using SolidWorks.Interop.sldworks;
using System.Collections.Generic;

namespace MechAddin.Command.零件刷
{
    internal class 零件刷Model
    {
        public static void 零件刷(ModelDoc2 swDoc)
        {
            if (swDoc is AssemblyDoc swDoc2)
            {
                SelectionMgr selMgr = swDoc.SelectionManager;
                List<Component2> comps = selMgr.GetSelectedComponents();
                if (comps.Count<2)
                {
                    return;
                }
                swDoc2.ReplaceComponents(comps[0].GetPathName(), comps);
            }
        }
    }
}
